#Region "Diclaimer"
'Copyright (c) 2006, Mark Bracewell (bracewell at wgg dot com)
'All rights reserved.
'Redistribution and use in source and binary forms, with or without
'modification, are permitted provided that the following conditions are met: 
'*

'* Redistributions of source code must retain the above copyright
'notice, this list of conditions and the following disclaimer.
'* Redistributions in binary form must reproduce the above copyright
'notice, this list of conditions and the following disclaimer in the
'documentation and/or other materials provided with the distribution.
'* The name Mark Bracewell may not be used to endorse or promote products
'derived from this software without specific prior written permission. 
'* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY
'EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
'WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
'DISCLAIMED. IN NO EVENT SHALL MARK BRACEWELL BE LIABLE FOR ANY
'DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
'(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
'LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
'ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
'(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
'SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
#End Region
Namespace Data
    Public Class ForumMessage
        Private _body, _subject, _displayname As String
        Private _msgid, _threadid, _parentmsgid, _topicid As Integer
        Private _postdate As Date
        Private _memberid As Guid
        Private _answer As Boolean

        Sub New()
        End Sub

        Sub New(ByVal subject As String, ByVal body As String, ByVal memberid As Guid, ByVal parentmsgid As Integer, ByVal topicid As Integer)
            _subject = subject
            _body = body
            _memberid = memberid
            _parentmsgid = parentmsgid
            _topicid = topicid
        End Sub

        Public Property body() As String
            Get
                Return _body
            End Get
            Set(ByVal value As String)
                _body = value
            End Set
        End Property

        Public Property answer() As Boolean
            Get
                Return _answer
            End Get
            Set(ByVal value As Boolean)
                _answer = value
            End Set
        End Property

        Public Property subject() As String
            Get
                Return _subject
            End Get
            Set(ByVal value As String)
                _subject = value
            End Set
        End Property

        Public Property displayname() As String
            Get
                Return _displayname
            End Get
            Set(ByVal value As String)
                _displayname = value
            End Set
        End Property

        Public Property msgid() As Integer
            Get
                Return _msgid
            End Get
            Set(ByVal value As Integer)
                _msgid = value
            End Set
        End Property

        Public Property parentmsgid() As Integer
            Get
                Return _parentmsgid
            End Get
            Set(ByVal value As Integer)
                _parentmsgid = value
            End Set
        End Property

        Public Property topicid() As Integer
            Get
                Return _topicid
            End Get
            Set(ByVal value As Integer)
                _topicid = value
            End Set
        End Property

        Public Property memberid() As Guid
            Get
                Return _memberid
            End Get
            Set(ByVal value As Guid)
                _memberid = value
            End Set
        End Property

        Public Property threadid() As Integer
            Get
                Return _threadid
            End Get
            Set(ByVal value As Integer)
                _threadid = value
            End Set
        End Property

        Public Property postdate() As Date
            Get
                Return _postdate
            End Get
            Set(ByVal value As Date)
                _postdate = value
            End Set
        End Property

        Public Overrides Function ToString() As String
            Return _subject
        End Function
    End Class
    Public Class ForumMessageCollection
        Inherits List(Of ForumMessage)
    End Class
End Namespace